<?php

namespace App\Http\Lib;

class ErrorCode
{
    const ACCESS_TIMEOUT = 40001;

    public static function getMessage($code)
    {
        switch( $code ) {
            case 404:
                return 'Not found.';
            case self::ACCESS_TIMEOUT:
                return '登录令牌已过期';
            case 403:
                return '无权访问';
            default:
                return 'Error.';
        }
    }

}